<?
session_start();
header("Content-type:application/vnd.ms-excel;charset=gbk");
header("Content-Disposition:attachment;filename=member_data.xls");
$protectid="201"; 
include ("../protect.php");
include "../../class/page.php";
require("../../class/mysqldb.inc.php");
$db=new mysqldb();
$page = new ShowPage;
$page->PageSize = 20;
if($keywords!=""){$sqlwhere=" where user_name like '%$keywords%' ";}
//$totalnumsql = "select * from hy_member where user_shen=1 or user_shen=2 order by user_id";
$totalnumsql = "select * from hy_member ".$sqlwhere." order by user_id";
$db->query($totalnumsql);
$recordcount = $db->get_num1();
$page->Total = $recordcount;
//$sql = "select * from hy_member where user_shen=1 or user_shen=2 order by user_id desc limit ".$page->OffSet();
$sql = "select * from hy_member ".$sqlwhere." order by user_id desc limit ".$page->OffSet();
$db->query($sql);
$news_result=$db->get_data();
$news_num=$db->get_num1();
?>
<html>
<head>
<title>产品管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

</head>
<body >
<br>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="word">
 
    <tr valign="top">
      <td colspan="3" height="2">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%" height="41" valign="top">
              <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#FFFFFF" class="word">
				 <tr>
                  <td height="30" colspan="9" valign="top"> <div align="center">
                   
                    </div></td>
                </tr>
				 <form name="fm2"  method="post" action="del_member.php" >
				<tr >
                  <td width="15%" background="../images/title3.gif" align="center"><span class="style1">用户名</span></td>
                  <td width="16%" align="center" background="../images/title3.gif"><span class="style1">积分</span></td>
                  <td width="11%" align="center" background="../images/title3.gif"><span class="style1">性别</span></td>
                  <!--<td width="20%" align="center" background="../images/title3.gif"><span class="style1">所在城市</span></td>-->
                  <td width="18%" align="center" background="../images/title3.gif"><span class="style1">电话/手机</span></td>
                  <!--<td width="18%" align="center" background="../images/title3.gif"><span class="style1">客户库存</span></td>-->
                </tr>
                <?
				$j=0;
				 if ($news_num>0){
				  for ($i=0;$i<$news_num;$i++){
              ?>
                <?
			  //色彩渐变
			  if($j==0)
			  {
			    echo "<tr>";
				$j=1;
			   }else
			   {
			     $j=0;
			  ?>
                <tr bgcolor="#f5f5f5">
                  <?
			   }
			   ?>
                  <td height="28" align="center"><? echo $news_result[$i]['user_name'];?>&nbsp;</td>
                  <td width="16%" align="center"><? echo $news_result[$i]['zhifen'];?>&nbsp;</td>
                  <td width="11%" align="center"> <? echo ($news_result[$i]['user_sex']=="1"?"男":"女");?>&nbsp;                  </td>
                  <!--<td width="20%" align="center"> <? echo $news_result[$i]['user_city']; ?></td>-->
				  
                  <td width="18%" align="center"><? echo $news_result[$i]['user_tel'];?>/<? echo $news_result[$i]['user_mobile'];?></td>
                <!--<td width="18%" align="center"><a href="addstock.php?uid=<? echo $news_result[$i]['user_id'];?>">库存添加</a></td>-->
                </tr>
                <tr id='<? echo 'subDiv_'.$news_result[$i]['user_id'];?>' >
                  <td height="30" colspan="10"  bgcolor="#F5F5F5">
				  <table width="100%"  border="1" cellpadding="0" cellspacing="0" bordercolor="#999999" bordercolorlight="#999999" bordercolordark="#FFFFFF" bgcolor="#FFF7EE">
          					<!--
                    <tr>
                      <td height="28" align="center">所在省份:</td>
                      <td><? echo $news_result[$i]['user_province']; ?>&nbsp;</td>
                    </tr>
                    -->
                    <tr>
                      <td height="28" align="center">注册时间:</td>
                      <td><? echo $news_result[$i]['user_regtime'];?>&nbsp;</td>
                    </tr>
                    <tr>
                      <td width="14%" height="28" align="center">地址：</td>
                      <td width="86%"><? echo $news_result[$i]['user_add'];?></td>
                    </tr>
                 <!--   <tr>
                      <td height="29" align="center">邮政编码：</td>
                      <td><? echo $news_result[$i]['user_zipcode'];?>&nbsp;</td>
                    </tr>-->
                    <tr>
                      <td height="28" align="center">Email：</td>
                      <td><? echo $news_result[$i]['user_email'];?>&nbsp;</td>
                    </tr>
                  <!--  <tr>
                      <td height="28" align="center">工作单位：</td>
                      <td><? echo $news_result[$i]['user_company'];?>&nbsp;</td>
                    </tr>-->
                    <tr>
                      <td height="28" align="center">个人简介：</td>
                      <td><? echo $news_result[$i]['user_intro'];?>&nbsp;</td>
                    </tr>
                  </table>
				  </td>
                </tr>
				  <?
			           }
					}
			   ?>
                
			    </form>
              </table>
            </td>
          </tr>
		
        </table>
      </td>
    </tr>
	
  </table>

 
</body>
</html>